import { get_List } from '../api/index'
console.log(get_List())

export let setName = () => {
    return {
        type: 'CHANGE_NAME',
        payload: {
            name: '李四'
        }
    }
}

export let getList = () => {
    return async (dispatch) => {
        let { data } = await get_List()
        console.log(data)
        dispatch({
            type: 'GET_LIST',
            payload: data
        })
    }
}